/*
 * MoveToFront.h
 *
 *  Created on: 22/04/2011
 *      Author: ehpalumbo
 */

#ifndef __MOVE_TO_FRONT_H__
#define __MOVE_TO_FRONT_H__

#include "TransformationProcess.h"
#include <vector>
#include <list>


namespace processes {


class MoveToFrontForwardTransformationProcess : public SingleTransformationProcess {
public:
	MoveToFrontForwardTransformationProcess(vector<DataUnit*>& dataUnits);
	virtual DataUnit* process(const DataUnit* dataUnit);
	virtual ~MoveToFrontForwardTransformationProcess();
protected:
	list<DataUnit*>* dataUnitsList;
	static bool compareDataUnits(DataUnit* first, DataUnit* second);
};

class MoveToFrontBackwardTransformationProcess : public SingleTransformationProcess {
public:
	MoveToFrontBackwardTransformationProcess(vector<DataUnit*>& dataUnits);
	virtual DataUnit* process(const DataUnit* dataUnit);
	virtual ~MoveToFrontBackwardTransformationProcess();
protected:
	list<DataUnit*>* dataUnitsList;
	static bool compareDataUnits(DataUnit* first, DataUnit* second);
};

}

#endif // __MOVE_TO_FRONT_H__
